package com.taxicalculator.service;

public class CalculatorService implements ICalculatorService {

	/**
	 * @author Martin Manger
	 * using the given inputs fuelCost calculates the estimated cost of a journey. 
	 */
	@Override
	public double fuelCost(double distance, double mpg, double cost)
			throws Exception {
		double endCost = (distance/mpg)*cost;
		return endCost;
	}

	/**
	 * @author Martin Manger
	 * using the given inputs costPer calculates the estimated cost of a journey when divided among a number of people. 
	 */
	@Override
	public double costPer(double cost, double people) throws Exception {
		double perCost = cost/people;
		return perCost;
	}

}
